package com.cskaoyan.mapper;
/*
 * @author 魏骏杰
 */

import com.cskaoyan.bean.mini_program_coupon.CouponBO;
import com.cskaoyan.bean.mini_program_coupon.CouponPOJO;
import com.cskaoyan.bean.mini_program_coupon.CouponUserPOJO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MiniProgramCouponMapper {
    List<CouponPOJO> findCurrentUsersCouponList(CouponBO name);

    CouponUserPOJO selectExchangeCodeHasCorrespondingCoupon(String code);

    int insertCouponToTableUser(CouponUserPOJO couponPOJO);

    Integer selectUserHasExchanged(@Param("id") Integer id, @Param("coupon_id") Integer coupon_id);

    Integer selectUserIdByName(String name);

    List<CouponPOJO> findAllAvailableCouponsList(CouponBO couponBO);

    CouponPOJO selectReceiveCouponByCouponId(CouponBO couponBO);

    List<CouponPOJO> selectCouponsWhichPriceInRange(CouponBO couponBO);

    List<Integer> selectCartIdForChooseCoupons(String username);
}
